const newsMod = require('../model/newsMod.js')

// 该层处理数据库参数
const newsServ = {
 newslistServ:async () => {
    const res = await newsMod.newslistMod()
    return res
  },
  webnewsListServ:async (data) => {
    const res = await newsMod.selectwebnewsListMod(data)
    return res
  },
  addNewsServ:async (data) => {
    await newsMod.createdNewsMod(data)
  },
  deletenewsServ:async (data) => {
    await newsMod.deletenewsMod(data)
  },
  selectNewsDetailServ:async (data) => {
    const res = await newsMod.selectNewsDetailMod(data)
    return res[0]
  },

}

module.exports = newsServ